import { EntityRepository, Repository } from 'typeorm';
import { AccountEntity } from '../../entities/account.entity';

@EntityRepository(AccountEntity)
export class AccountRepository extends Repository<AccountEntity> {
  async list() {
    console.log(this);
    return await this.find();
  }

  async createAccount(data: any): Promise<any> {
    const account = this.create(data);
    return await this.save(account);
  }
}
